@keyframes spin {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(360deg);
  }
}
@keyframes spin-reverse {
  0% {
    transform: rotate(0deg);
  }
  100% {
    transform: rotate(-360deg);
  }
}

#loader-wrapper {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 999;
  overflow: hidden;
  .loader {
    width: 100%;
    height: 100%;
    position: absolute;
    top: 0;
    left: 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    .loader-circle {
      width: 150px;
      height: 150px;
      border-radius: 50%;
      border: 3px solid transparent;
      border-top-color: #FFF;
      animation: spin 1.8s linear infinite;
      z-index: 2;
      display: flex;
      align-items: center;
      justify-content: center;

      .second-circle {
        content: "";
        width: 120px;
        height: 120px;
        border-radius: 50%;
        border: 3px solid transparent;
        border-top-color: #a4a4a4;
        animation: spin-reverse .6s linear infinite;
        display: flex;
        align-items: center;
        justify-content: center;
        .small-circle {
          content: "";
          display: inline-block;
          width: 100px;
          height: 100px;
          border-radius: 50%;
          border: 3px solid transparent;
          border-top-color: #d3d3d3;
          animation: spin 1.8s linear infinite;
        }
      }
    }
    .loader-text {
      display: flex;
      flex-direction: column;
      align-items: center;
      color: #FFF;
      z-index: 2;
      margin-top: 40px;
      font-size: 24px;
      .tip {
        margin-top: 6px;
        font-size: 18px;
        opacity: 0.6;
      }
    }
  }
  .loader-section {
    position: fixed;
    width: 51%;
    height: 100%;
    background-color: #333;
    &.section-left {
      left: 0;
    }
    &.section-right {
      right: 0;
    }
  }
  // 加载界面消失时的动画
  &.loaded {
    visibility: hidden;
    transform: translateY(-100%);
    transition: transform 0.3s 1s ease-out, visibility 0.3s 1s ease-out;
    .loader {
      .loader-circle,
      .loader-text {
        opacity: 0;
        transition: opacity 0.3s ease-out;
      }
    }
    .loader-section {
      &.section-left {
        transform: translateX(-100%);
        transition: transform 0.5s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
      }
      &.section-right {
        transform: translateY(+100%);
        transition: transform 0.5s 0.3s cubic-bezier(0.645, 0.045, 0.355, 1);
      }
    }
  }
}
